from biz_code.d import d70550001_user_comm as db
from biz_code.component.comm import public_utils


async def a60610001_user_qry(request):
    result = {"code": 0, "msg": "调用成功"}
    print(request.json)
    params = request.json
    try:
        # 显性取参, False 不是必填， True 必填
        params = {
            "nick_name": public_utils.get_params(params, "nick_name", "", False)
        }

        conn_id = request.app.auto_commit_mysql_conn
        result = await db.qry_user(params, conn_id)

        # redis 查询
        # redis_result = await request.app.redis_pool.get("hot_data")

    except Exception as error:
        print(" error : ", error)
        result["code"] = 200
        result["msg"] = "调用错误"
    finally:
        return result


function = a60610001_user_qry
